<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h2>浅拷贝</h2>
</body>
<script>
    //基本类型赋值情况
    let str = 'hello'
    let str2 = str;

    str2 = 'vue.js'
    str2.name = '我是str2'
    str2.aaa = 'abc'
    str.name = '哈哈'

    console.log('str:', str) //str??
    console.log('str2:', str2) //str2???
    console.log('str.name:', str.name) //str2.name
    console.log('str2.aaa:', str2.aaa) //str2.name
</script>

</html>